1940 |
2022 |
1. Perform calculations
2. Store results of calculations
Computational thinking is breaking down a problem and formulating a solution in a way that both human and computer can understand and execute.
Wing, Jeannette M. 2006. "Computational Thinking." Communications of the ACM, 49 (3): 33–35. doi: 10.1145/1118178.1118215
Finite list of well-defined instructions that take input and produce output.
Consists of a sequence of simple steps that start from input, follow some control flow and have a stopping rule.
Formal language used to define sequences of instructions (for computers to execute) that includes:
77001
77001
'POP'
'POP'
77001 + 23
77024
77001 + 23
77024
77001 23 +
File "<ipython-input-5-7df1296e3e0d>", line 1 77001 23 + ^ SyntaxError: invalid syntax
'POP' + 77001
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-7d1b83a55295> in <module> ----> 1 'POP' + 77001 TypeError: can only concatenate str (not "int") to str
Grace Murray Hopper popularised the term bug after in 1947 her team traced an error in the Mark II to a moth trapped in a relay.
print() statement to check the state between proceduresExtra: Five reasons why researchers should learn to love the command line
| Command (Windows) | Command (macOS/Linux) | Description |
|---|---|---|
exit |
exit |
close the window |
cd |
cd |
change directory |
cd |
pwd |
show current directory |
dir |
ls |
list directories/files |
copy |
cp |
copy file |
move |
mv |
move/rename file |
mkdir |
mkdir |
create a new directory |
del |
rm |
delete a file |
Extra: Introduction to CLI
| Command | Description |
|---|---|
git init <project name> |
Create a new local repository |
git clone <project url> |
Download a project from remote repository |
git status |
Check project status |
git diff <file> |
Show changes between working directory and staging area |
git add <file> |
Add a file to the staging area |
git commit -m “<commit message>” |
Create a new commit from changes added to the staging area |
git pull <remote> <branch> |
Fetch changes from remote and merge into merge |
git push <remote> <branch> |
Push local branch to remote repository |
Extra: Git Cheatsheet